<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>修改密码——单点登录系统</title>
    <link href="<%=request.getContextPath() %>/res/css/bootstrap.min.css" rel="stylesheet">
  </head>
  <body>
	    <form style="width: 330px;margin: 0 auto; padding: 15px;"  action="<%=request.getContextPath() %>/changePassword" method="post">
	    <h2 >修改密码</h2>
	    <div id="errormsg" class="form-group">
	    </div>
		  <div class="form-group input-group">
		    <div class="input-group-addon">账号</div>
		    <input type="text" name="userName" class="form-control input-lg" id="userName" placeholder="账号" />
		  </div>
		  <div class="form-group input-group">
		    <div class="input-group-addon">原密码</div>
		    <input type="password" name="password" class="form-control input-lg" id="password" placeholder="原密码" />
		  </div>
		  <div class="form-group input-group">
		    <div class="input-group-addon">新密码</div>
		    <input type="password" name="password" class="form-control input-lg" id="password" placeholder="新密码" />
		  </div>
		  <div class="form-group input-group">
		    <div class="input-group-addon">新密码确认</div>
		    <input type="password" name="rePassword" class="form-control input-lg" id="rePassword" placeholder="新密码确认" />
		  </div>
		  <div class="form-group">
		  	<button type="submit" class="btn btn-lg btn-primary btn-block">确认修改</button>
		  </div>
		</form>
	    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
	    <script src="<%=request.getContextPath() %>/res/js/bootstrap.min.js"></script>
    
    <script type="text/javascript">
		function showErrorMsg(errorMsg){
			if(errorMsg!=null && errorMsg!=""){
				$("#errormsg").html("<div  class=\"alert alert-danger\">"+errorMsg+"</div>");
			}
		}
		$(function() {
			var errorMsg="${change_password_error_msg }";
			showErrorMsg(errorMsg);
		});
	</script>
  </body>
</html>